package com.benshou.bcss.common.taskscheduler.config.props;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

/**
 * Task Scheduler 线程池属性
 *
 * @author <a href="mailto:liuzhenbang@benshou.com">Liu Zhenbang</a>
 */
@ConfigurationProperties(prefix = "task.scheduler.thread-pool")
@Data
@Validated
public class TaskSchedulerThreadPoolProps {

    /**
     * 线程池大小
     */
    @NotNull
    @Min(1)
    private Integer poolSize = 5;

    /**
     * 线程名称前缀
     */
    @NotNull
    private String threadNamePrefix = "scheduled-";
}
